{- -}
module Main (main) where

import XI.Directory.Parser
import XI.Directory.Todo
import XI.Directory.Types
import Text.ParserCombinators.Parsec.Prim
import HixayGraph

handleCfg :: Configuration -> IO ()
handleCfg cfg = do
    print $ length $ allChains scenarios
    writeFile "script3.dot" $ dotChainsString $ allChains scenarios
    return ()
    where
        scenarios = fst cfg
        allChains :: [Scenario] -> [Chain]
        allChains = concatMap scenario_chains

main = do
    s <- parseFromFile parseDir "script.res"
    case s of
        Left err -> do {putStr "parse error at "; print err} 
        Right x -> handleCfg x

